using System;

namespace Wax
{
    /// <summary>
    /// The command completed event arguments
    /// </summary>
    public class CommandCompletedEventArgs : EventArgs
    {
        /// <summary>
        /// The number of successfully completed commands
        /// </summary>
        private int numberOfCompletedCommands;

        /// <summary>
        /// The number of commands that failed to complete successfully.
        /// </summary>
        private int numberOfFailedCommands;

        /// <summary>
        /// <c>true</c> if the command completed successfully; otherwise <c>false</c>.
        /// </summary>
        private readonly bool success;
        
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandCompletedEventArgs"/> class.
        /// </summary>
        /// <param name="numberOfCompletedCommands">The number of completed commands.</param>
        /// <param name="numberOfFailedCommands">The number of failded commands.</param>
        /// <param name="success">if set to <c>true</c> [success].</param>
        public CommandCompletedEventArgs(int numberOfCompletedCommands, int numberOfFailedCommands, bool success)
        {
            this.numberOfCompletedCommands = numberOfCompletedCommands;
            this.numberOfFailedCommands = numberOfFailedCommands;
            this.success = success;
        }

        /// <summary>
        /// <c>true</c> if the command completed successfully; otherwise <c>false</c>.
        /// </summary>
        public bool Success
        {
            get { return success; }
        }

        /// <summary>
        /// The number of successfully completed commands
        /// </summary>
        public int NumberOfCompletedCommands
        {
            get { return numberOfCompletedCommands; }
        }

        /// <summary>
        /// The number of commands that failed to complete successfully.
        /// </summary>
        public int NumberOfFailedCommands
        {
            get { return numberOfFailedCommands; }
        }
    }
}